import 'package:flutter/material.dart';

class GestureDetectorWidget extends StatelessWidget {
  const GestureDetectorWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(
          '手势',
          style: TextStyle(fontSize: 20),
        ),
      ),
      body: GestureDetector(
        child: Text(
          'GestureDetector',
          style: TextStyle(fontSize: 20),
        ),
        onTap: () {
          print('您点击了一次');
        },
        onLongPress: () {
          print('您长按了一次');
        },
      ),
    );
  }
}
